<script>
if ("netscape" in window) {
 alert("Firefox");
} else if ("chrome" in window) {
 alert("Chrome");
} // etc...
</script>

